home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / russell / russell.lha / examples / extend_test.r < prev    next >
Text File  |  1989-12-29  |  300b  |  11 lines

  1. let
  2.   Strange == extend { Short } with S { a == S$+ };
  3.   f == func[T:type t {a: func[x,y: val t]val t; '1'; '2'; ^+}] val T
  4.         {use T in a[21,2] ni}
  5. in
  6.   put["This should print 13, 17, and 23\n"];
  7.   put[Strange$13]; put['\n'];
  8.   put[Out[Strange$17]]; put['\n'];
  9.   put[f[Strange]]; put['\n'];
  10. ni
  11.